<template>
  <header class="container-fluid">
<!--    这里动态获取到不同模块的颜色-->
    <div class="nav-left" :style="{ backgroundColor: leftColor }">
      <img src="../../../../static/HHLDB_LOGO.png" alt="ws-soc Logo" class="nav-logo"
           width="300" height="75" style="margin-top: -5px"/>
    </div>
    <nav class="nav-right" :style="{ backgroundColor: rightColor }">
      <ul>
        <li>
          <router-link to="/hhldb/home">HOME</router-link>
          <router-link to="/hhldb/search">SEARCH</router-link>
          <router-link to="/hhldb/view">VIEW</router-link>
          <router-link to="/hhldb/analysis">ANALYSIS</router-link>
          <router-link to="/hhldb/datasource">DATASOURCE</router-link>
          <router-link to="/hhldb/about">ABOUT</router-link>
          <router-link to="/hhldb/help">HELP</router-link>
          <router-link to="/hhldb/tools">TOOLS</router-link>
        </li>
      </ul>
    </nav>
  </header>
</template>

<script>
export default {
  name: 'MyHeader',
  props: {
    leftColor: {
      type: String,
      default: '#5995ff' // Default color for left side
    },
    rightColor: {
      type: String,
      default: '#2c5fdf' // Default color for right side
    }
  }
}
</script>

<style scoped>
.container-fluid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999; /* 设置一个较大的 z-index 值，确保 Header 处于最上层 */
}
.nav-left {
  padding: 0.5rem 1rem;
  float: left;
  height: 80px;
  width: 25%;
}
.nav-right {
  padding: 0.5rem 1rem;
  overflow: hidden;
  height: 80px;
  width: 75%;
}
.nav-logo {
  mix-blend-mode: multiply;
}
nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  align-items: center;
  height: 100%;
}
nav ul li {
  padding: 0 1rem;
}
nav ul li a {
  color: white;
  font-size: 28px;
  text-decoration: none;
  font-weight: bold;
  margin-right: 10px;
  margin-left: 10px;
}
nav ul li a:hover {
  text-decoration: underline;
}
</style>
